#ifndef PL_CVIMGUTILS_H
#define PL_CVIMGUTILS_H

#define CVIMGUTILS_OBJ_ID 670587

#include "../core/AbstractObject.h"
#include "../core/ObjectFactory.h"
#include "../core/SimpleImage.h"

//POP_FUNC SimpleImage*
//SimpleImage* a%(argPos)d = pop_custom<SimpleImage>(L, %(luaPos)d, "SimpleImage");

//PUSH_FUNC SimpleImage*
//push_custom<SimpleImage>(L, ret, "SimpleImage");

//OBJTYPE CVImgUtils
class CVImgUtils : public AbstractObject
{
public:
	CVImgUtils();

	// Return the c++ type id
	virtual int getCppTypeId();
	// Returns whether this can be cast to a given type
	virtual bool isType(int id);

	// Return the c++ type as a string 
	virtual std::string getCppTypeName();

	// returns a description of this thing
	virtual std::string getDescription();

	// create another one of these
	virtual AbstractObject* newInstance();

	// init & update
	virtual void init();
	virtual void update(double dt);

	// push its static functions into the given lua table
	virtual void pushStaticFuncs(lua_State* L);

	virtual ~CVImgUtils();

	//LIAG_THESE
	void saveImage(SimpleImage* img, std::string fn);
	SimpleImage* loadImage(std::string fn);
	//STOP_LIAG
	
private:
	// nothing at the moment?
};

#endif